package com.zy.ems.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.zy.ems.common.base.BaseDao;
import com.zy.ems.mapper.MemberMapper;
import com.zy.ems.model.MemberEntity;

@Repository
public class MemberDao extends BaseDao<MemberEntity, Integer> {

    @Autowired
    private MemberMapper memberMapper;

    @Override
    @SuppressWarnings("unchecked")
    public MemberMapper getMapper() {
        return this.memberMapper;
    }

    @Override
    protected String getNamespace() {
        return MemberMapper.class.getName();
    }

    public MemberEntity getByUserName(String userName) {
        return this.memberMapper.getByUserName(userName);
    }

    public void updateMemberStatus(Map<String , Object> param){
        this.memberMapper.updateMemberStatus(param);
    }
}
